3.12 \(\int \frac{\cos ^2(a+b x^2)}{x} \, dx\)

Optimal. Leaf size=37 \[ \frac{1}{4} \cos (2 a) \text{CosIntegral}\left (2 b x^2\right )-\frac{1}{4} \sin (2 a) \text{Si}\left (2 b x^2\right )+\frac{\log (x)}{2} \]

[Out]

(Cos[2*a]*CosIntegral[2*b*x^2])/4 + Log[x]/2 - (Sin[2*a]*SinIntegral[2*b*x^2])/4

________________________________________________________________________________________

Rubi [A]  time = 0.0518501, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {3404, 3378, 3376, 3375} \[ \frac{1}{4} \cos (2 a) \text{CosIntegral}\left (2 b x^2\right )-\frac{1}{4} \sin (2 a) \text{Si}\left (2 b x^2\right )+\frac{\log (x)}{2} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x^2]^2/x,x]

[Out]

(Cos[2*a]*CosIntegral[2*b*x^2])/4 + Log[x]/2 - (Sin[2*a]*SinIntegral[2*b*x^2])/4

Rule 3404

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandTrigReduce[(e
*x)^m, (a + b*Cos[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[p, 1] && IGtQ[n, 0]

Rule 3378

Int[Cos[(c_) + (d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Dist[Cos[c], Int[Cos[d*x^n]/x, x], x] - Dist[Sin[c], Int[Si
n[d*x^n]/x, x], x] /; FreeQ[{c, d, n}, x]

Rule 3376

Int[Cos[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[CosIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3375

Int[Sin[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[SinIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rubi steps

\begin{align*} \int \frac{\cos ^2\left (a+b x^2\right )}{x} \, dx &=\int \left (\frac{1}{2 x}+\frac{\cos \left (2 a+2 b x^2\right )}{2 x}\right ) \, dx\\ &=\frac{\log (x)}{2}+\frac{1}{2} \int \frac{\cos \left (2 a+2 b x^2\right )}{x} \, dx\\ &=\frac{\log (x)}{2}+\frac{1}{2} \cos (2 a) \int \frac{\cos \left (2 b x^2\right )}{x} \, dx-\frac{1}{2} \sin (2 a) \int \frac{\sin \left (2 b x^2\right )}{x} \, dx\\ &=\frac{1}{4} \cos (2 a) \text{Ci}\left (2 b x^2\right )+\frac{\log (x)}{2}-\frac{1}{4} \sin (2 a) \text{Si}\left (2 b x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0672536, size = 34, normalized size = 0.92 \[ \frac{1}{4} \left (\cos (2 a) \text{CosIntegral}\left (2 b x^2\right )-\sin (2 a) \text{Si}\left (2 b x^2\right )+2 \log (x)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x^2]^2/x,x]

[Out]

(Cos[2*a]*CosIntegral[2*b*x^2] + 2*Log[x] - Sin[2*a]*SinIntegral[2*b*x^2])/4

________________________________________________________________________________________

Maple [A]  time = 0.046, size = 32, normalized size = 0.9 \begin{align*}{\frac{{\it Ci} \left ( 2\,b{x}^{2} \right ) \cos \left ( 2\,a \right ) }{4}}+{\frac{\ln \left ( x \right ) }{2}}-{\frac{{\it Si} \left ( 2\,b{x}^{2} \right ) \sin \left ( 2\,a \right ) }{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x^2+a)^2/x,x)

[Out]

1/4*Ci(2*b*x^2)*cos(2*a)+1/2*ln(x)-1/4*Si(2*b*x^2)*sin(2*a)

________________________________________________________________________________________

Maxima [C]  time = 1.36611, size = 69, normalized size = 1.86 \begin{align*} \frac{1}{8} \,{\left ({\rm Ei}\left (2 i \, b x^{2}\right ) +{\rm Ei}\left (-2 i \, b x^{2}\right )\right )} \cos \left (2 \, a\right ) + \frac{1}{8} \,{\left (i \,{\rm Ei}\left (2 i \, b x^{2}\right ) - i \,{\rm Ei}\left (-2 i \, b x^{2}\right )\right )} \sin \left (2 \, a\right ) + \frac{1}{2} \, \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)^2/x,x, algorithm="maxima")

[Out]

1/8*(Ei(2*I*b*x^2) + Ei(-2*I*b*x^2))*cos(2*a) + 1/8*(I*Ei(2*I*b*x^2) - I*Ei(-2*I*b*x^2))*sin(2*a) + 1/2*log(x)

________________________________________________________________________________________

Fricas [A]  time = 1.60196, size = 153, normalized size = 4.14 \begin{align*} \frac{1}{8} \,{\left (\operatorname{Ci}\left (2 \, b x^{2}\right ) + \operatorname{Ci}\left (-2 \, b x^{2}\right )\right )} \cos \left (2 \, a\right ) - \frac{1}{4} \, \sin \left (2 \, a\right ) \operatorname{Si}\left (2 \, b x^{2}\right ) + \frac{1}{2} \, \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)^2/x,x, algorithm="fricas")

[Out]

1/8*(cos_integral(2*b*x^2) + cos_integral(-2*b*x^2))*cos(2*a) - 1/4*sin(2*a)*sin_integral(2*b*x^2) + 1/2*log(x
)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos ^{2}{\left (a + b x^{2} \right )}}{x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x**2+a)**2/x,x)

[Out]

Integral(cos(a + b*x**2)**2/x, x)

________________________________________________________________________________________

Giac [A]  time = 1.16839, size = 47, normalized size = 1.27 \begin{align*} \frac{1}{4} \, \cos \left (2 \, a\right ) \operatorname{Ci}\left (2 \, b x^{2}\right ) + \frac{1}{4} \, \sin \left (2 \, a\right ) \operatorname{Si}\left (-2 \, b x^{2}\right ) + \frac{1}{4} \, \log \left (b x^{2}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)^2/x,x, algorithm="giac")

[Out]

1/4*cos(2*a)*cos_integral(2*b*x^2) + 1/4*sin(2*a)*sin_integral(-2*b*x^2) + 1/4*log(b*x^2)